
#ifndef __CELINPUTDEVICES_H__
#define __CELINPUTDEVICES_H__

#include "_CElInputDevices.h"
#include <stdlib.h>
#include <elastos.h>
#include <stdio.h>
#include <aura.h>
#include "simulator.h"

CarClass(CElInputDevices)
{
public:
    CARAPI Stop();

    CARAPI SendKeyEvent(
        /* [in] */ KeyEventType keyEvent,
        /* [in] */ Int32 keyCode,
        /* [in] */ Int64 timeStamp);

    CARAPI SendMouseEvent(
        /* [in] */ MouseEventType mouseEvent,
        /* [in] */ Int32 x,
        /* [in] */ Int32 y,
        /* [in] */ Int64 timeStamp);
    
    CARAPI GetSimulatorWindowInfo(
        /* [out] */ struct SimulatorWindowInfo * pInfo);

    CARAPI constructor();

    ~CElInputDevices();
    
    ECode invokeCallBack();
private:
    // TODO: Add your private member variables here.
    IMutex* m_pipeMutex;
    Aura_ChannelId  m_channelId;
    void* m_hSimulatorStartEvent;
    bool m_isRunning;
    ECode GetPipe();
    ECode startSimulator(char* product);
    ECode stopDrawing();
    IThread* m_pWaitThread;
    SimulatorInfo m_simulatorInfo;
};

#endif // __CSIMULATORHOST_H__
